package cn.thread;

public class PriorityTest {
public static void main(String args[]){
    PriorityTest001 p=new PriorityTest001();
    Thread h=new Thread(p,"回力");
    h.setPriority(Thread.MAX_PRIORITY);
    h.start();
    Thread n=new Thread(p,"耐克");
    n.setPriority(Thread.MIN_PRIORITY);
    n.start();
    Thread q=new Thread(p,"乔丹");
    q.setPriority(Thread.NORM_PRIORITY);
    q.start();
    Thread l=new Thread(p,"李宁");
    l.setPriority(Thread.MAX_PRIORITY);
    l.start();
}
}
class PriorityTest001 implements Runnable{

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName());
    }
}
